package com.fallsvc.re.javasesets.mapandset;

import javafx.util.Pair;

import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Set;

/**
 * @auther falls_vc
 * description:
 * @date 2025/10/25  20:03
 */
public class Demo1 {
    public static void main(String[] args) {
        StringBuilder stringBuilder = new StringBuilder();

        String s = "as";

        System.out.println(s.toUpperCase());
        Pair<String,Integer> p = new Pair<>("",1);
        p.getValue();
        p.getKey();

        PriorityQueue<Pair<String,Integer>> p1 = new PriorityQueue<>(
                (s1,s2) -> {
                    if(s1.getValue() == s2.getValue()) {
                        return s2.getKey().compareTo(s1.getKey());
                    }
                    return s1.getValue() - s2.getValue();
                }
        );
    }
    public static void main1(String[] args) {
        Map<Integer,String> map = new HashMap<>();
        map.put(1,"shangsan");
        System.out.println(map.containsKey(1));
        System.out.println(map.containsValue(1));
        map.put(null,null);
        System.out.println(map.get(null));
//        map.remove(1);
        Set<Integer> set = map.keySet();
        for (Integer x : set) {
            System.out.println(x);
        }

    }
}
